﻿using DemoPrism.Core;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Navigation.Regions;
using ZhlTextMod.Views;

namespace ZhlTextMod
{
    public class ZhlTextModModule : IModule
    {
        private readonly IRegionManager _regionManager;
        public string Title { get; set; } = "ZhlTextMod";

        public ZhlTextModModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {
            _regionManager.RequestNavigate(RegionNames.ContentRegion, "TextWindow");
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<TextWindow>();
        }
    }
}